package com.ffcs.web.controllers;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ffcs.web.services.OrderService;
import com.ffcs.web.utils.CommonConfig;

@Controller
public class WxPayController {

private Logger logger = Logger.getLogger(WxPayController.class);
	
	@Autowired
	private OrderService orderService;
	
	/**
	 * 获取网页授权code
	 * @return
	 * @throws IOException 
	 */
//	@RequestMapping("addOrder")
//	@ResponseBody
//	public void addOrder(HttpServletResponse response) throws IOException{
//		String redirect_uri=CommonConfig.getProperty("REDIRECT_URI");
//		String appid=CommonConfig.getProperty("APPID");
//		String url="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appid+"&redirect_uri="+redirect_uri+"&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
//		response.sendRedirect(url);
//	}
}
